#coding=utf-8

class Species(object):
    def __init__(self):
        attrs = ['class_', 'order', 'family', 'genus', 'species', 
                 'distribution', 'biology','diagnosis', 'author', 
                 'chromosome', 'DNA', 'image']
        for attr in attrs:
            setattr(self, attr, None)
    
    def get_latin_name(self):
        g = self.genus[0].split(' ')[0]
        s = self.species[0]
        if self.author: a = '(%s)'%self.author
        else:
            a = ''
        return ' '.join([g,s,a])
    latin_name = property(fget=get_latin_name)
